package com.gsoe.auth.controller;

import com.gsoe.auth.po.Class;
import com.gsoe.auth.service.ClassService;
import com.gsoe.auth.vo.AllClassVO;
import com.gsoe.auth.vo.ClassVO;
import com.gsoe.base.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 班级表 前端控制器
 * </p>
 *
 * @author xiaoma
 * @since 2024-12-14
 */
@RestController
@RequestMapping("/class")
public class ClassController {
    @Autowired
    private ClassService classService;

    @GetMapping("/getUserClass")
    public Result<List<ClassVO>> getUserClass(Long userId, String input) {
        return Result.success(classService.getUserClass(userId,input));
    }

    @GetMapping("/getAllClassList")
    public Result<List<AllClassVO>> getAllClass(String input) {
        return Result.success(classService.getAllClass(input));
    }
}
